package com.mt.api.modules.controller;

import com.mt.common.response.WebPageResponse;
import com.mt.api.modules.domain.bo.StockCargoPageBo;
import com.mt.api.modules.domain.vo.StockCargoRecordVo;
import com.mt.api.modules.service.AppStockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;


/**
 * @author plover
 * @date 2020-07-06
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "stock管理")
@RequestMapping("/app/stock")
public class AppStockController {

    private final AppStockService appStockService;

    /**
     * 库存记录-按款号分组
     *
     * @return
     */
    @GetMapping("/recordWithCargo")
    @ApiOperation(value = "", notes = "库存数据(按款号分组)", httpMethod = "GET")
    public WebPageResponse<StockCargoRecordVo> recordWithCargo(StockCargoPageBo bo) {
        return appStockService.recordWithCargo(bo);
    }
}